import Immutable from 'seamless-immutable';
import * as types from '../constants/ActionTypes';

const userManage = Immutable.from({
  editPsdMsg: {}
});
export default function userInfo(state = userManage, action) {
  const { type, payload } = action;
  switch (type) {
    case types.SAVE_PASSWD:
      return state.setIn(['editPsdMsg'], payload);
    case types.RESTORE_TEST_PACKAGE:
      return state.setIn(['editPsdMsg'], {});
    default:
      return state;
  }
}
